/**
 * 干扰部署的配置项
 *
 */


const interNum = parseInt(getDomValueById("inter_num")) // 干扰雷达数量
const interRange = parseInt(getDomValueById("inter_range")) // 干扰雷达范围
const targetNum = parseInt(getDomValueById("target_num"))  // 目标数量
const particleNum = parseInt(getDomValueById("particle_num") || 10)  // 种群内粒子数
const iterNum = parseInt(getDomValueById("iter_num") || 5000)  // 迭代次数
const method = "IQPSO"// 算法选择

const config = {
  interNum,
  interRange,
  targetNum,
  particleNum,
  iterNum,
  method,
}

/**
 * 根据Dom节点的id获取Dom节点值
 * @param id
 */
function getDomValueById(id) {
  return document.getElementById(id).value.trim()
}

// 导出配置项
module.exports = config